const express = require('express')
const app = express();

const { youtubeAPI, youtubeAuth } = require('./youtube');

app.get('/', (req, res) => {
    res.send('okokok');
});

app.get('/test', (req, res) => {
    youtubeAPI.search.list(
    {'maxResults': '25',
    'part': 'snippet',
    'q': 'surfing',
    'type': '',
    'auth': youtubeAuth }, function(err, response) {
        if (err) {
          console.log('The API returned an error: ' + err);
          return;
        }
        res.send(response);
      });
})

app.listen(3000);

